### Makefile --- 
## Time-stamp: <2008-12-23 11:06:55 lancer>
## Author: root@localhost.localdomain
## Version: $Id: Makefile,v 0.0 2008/11/08 04:09:55 root Exp $
## Keywords: 
## X-URL: 

.SUFFIXES: .cc
.PHONY: clean all

INCGSOAP=-I/usr/local/share/gsoap/import -I/usr/include/gsoap
INCS=-I.
LIBS=-lgsoap++

CFLAGS=-O -DUNIX -DLIB -DDEBUG -DTRACE_FILE='"./trace"' -fPIC
CC=gcc
CXX=g++ -g

WSDL=EsmsService_act.wsdl
ESMSH=Esms.h
SOAPC=soapC.cpp
SOAPPROXYC=soapEsmsServiceSoapProxy.cpp
SOAPOBJ=soapC.o
SOAPPROXYOBJ=soapEsmsServiceSoapProxy.o

all: wrapesms.o testesms
	@echo "done"

$(ESMSH): $(WSDL)
	wsdl2h -o $@ $<

$(SOAPC) $(SOAPPROXYC): $(ESMSH)
# 	soapcpp2 -n -t -i -C $(ESMSH) $(INCGSOAP)
	soapcpp2 -t -i -C $< $(INCGSOAP)

$(SOAPOBJ): $(SOAPC)
	$(CXX) -DWITH_COOKIES -c $<

$(SOAPPROXYOBJ): $(SOAPPROXYC)
	$(CXX) -DWITH_COOKIES -c $<

wrapesms.o:  wrapesms.cc wrapesms.hh $(SOAPOBJ) $(SOAPPROXYOBJ)
	$(CXX) -c wrapesms.cc -o $@

testesms.o:  testesms.cc testesms.h 
	$(CXX) -c $<

testesms: wrapesms.o testesms.o $(SOAPOBJ) $(SOAPPROXYOBJ)
	$(CXX) -DWITH_COOKIES -o $@ ../inifile.o ../excep.o wrapesms.o testesms.o $(SOAPOBJ) $(SOAPPROXYOBJ) $(LIBS)

testsoap.o: testsoap.cc
	$(CXX) -c $<

testsoap: testsoap.o soapC.o soapEsmsServiceSoapProxy.o
	$(CXX) -DWITH_COOKIES -o $@ testsoap.o soapC.o soapEsmsServiceSoapProxy.o $(LIBS)

clean:
	-rm *.o $(ESMSH) soap* *.xml *.gch

### Makefile ends here
